﻿using System;
using Character;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.EventSystems;
using UnityEngine.UI;

// Token: 0x0200041D RID: 1053
public class H_Debug : MonoBehaviour
{
	// Token: 0x06001A28 RID: 6696 RVA: 0x000A77C8 File Offset: 0x000A59C8
	private void Start()
	{
		this.canvas = base.GetComponent<Canvas>();
		this.mozToggle.isOn = (this.mozMaterials[0].GetFloat("_White") > 0f);
		this.mozToggle.onValueChanged.AddListener(new UnityAction<bool>(this.OnChangeMozToggle));
		for (int i = 0; i < this.spermAddButtons.Length; i++)
		{
			int no = i;
			this.spermAddButtons[i].onClick.AddListener(delegate()
			{
				this.AddSperm(no);
			});
		}
		this.spermClearButton.onClick.AddListener(new UnityAction(this.ClearSperm));
	}

	// Token: 0x06001A29 RID: 6697 RVA: 0x000A7888 File Offset: 0x000A5A88
	private void Update()
	{
		if (EventSystem.current != null && EventSystem.current.currentSelectedGameObject != null)
		{
			return;
		}
		if (Input.GetKeyDown(KeyCode.Delete))
		{
			this.canvas.enabled = !this.canvas.enabled;
		}
	}

	// Token: 0x06001A2A RID: 6698 RVA: 0x000A78E0 File Offset: 0x000A5AE0
	private void OnChangeMozToggle(bool flag)
	{
		float value = (!flag) ? 0f : 1f;
		for (int i = 0; i < this.mozMaterials.Length; i++)
		{
			this.mozMaterials[i].SetFloat("_White", value);
		}
	}

	// Token: 0x06001A2B RID: 6699 RVA: 0x000A7930 File Offset: 0x000A5B30
	private void AddSperm(int no)
	{
		foreach (Female female in this.h_scene.mainMembers.GetFemales())
		{
			female.AddSperm((SPERM_POS)no);
		}
	}

	// Token: 0x06001A2C RID: 6700 RVA: 0x000A7998 File Offset: 0x000A5B98
	private void ClearSperm()
	{
		foreach (Female female in this.h_scene.mainMembers.GetFemales())
		{
			female.ClearSpermMaterials();
		}
	}

	// Token: 0x04001D0A RID: 7434
	[SerializeField]
	private Button buttonOriginal;

	// Token: 0x04001D0B RID: 7435
	[SerializeField]
	private H_Scene h_scene;

	// Token: 0x04001D0C RID: 7436
	[SerializeField]
	private Toggle mozToggle;

	// Token: 0x04001D0D RID: 7437
	[SerializeField]
	private Material[] mozMaterials;

	// Token: 0x04001D0E RID: 7438
	[SerializeField]
	private Button[] spermAddButtons;

	// Token: 0x04001D0F RID: 7439
	[SerializeField]
	private Button spermClearButton;

	// Token: 0x04001D10 RID: 7440
	private Canvas canvas;
}
